﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="tmppingstatus.aspx.cs" Inherits="Com.Rivyer.Web.monitor.tmppingstatus" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.2.Export, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dx" %>

<%@ Register assembly="DevExpress.Web.ASPxPivotGrid.v11.2.Export, Version=11.2.7.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPivotGrid.Export" tagprefix="dx" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Ping状态列表</title>
    <link href="../css/style.css" rel="stylesheet" type="text/css" />
    <link href="../css/rivcontent.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <%if (DesignMode)
      { %>
    <script type="text/javascript" src="../js/ASPxScriptIntelliSense.js"></script>
    <%} %>
    <script type="text/javascript">
        
    </script>
    <div>
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
            <tr>
                <td height="30">
                    <table width="100%" border="0" cellspacing="0" cellpadding="0">
                        <tr>
                            <td height="24" bgcolor="#353c44">
                                <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                    <tr>
                                        <td>
                                            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                                                <tr>
                                                    <td width="6%" height="19" valign="bottom">
                                                        <div align="center">
                                                            <img src="../images/tb.gif" width="14" height="14" /></div>
                                                    </td>
                                                    <td width="94%" valign="bottom">
                                                        <span class="STYLE1">Ping状态列表</span>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td align="center" style="font-size: 12px; width=100%">
                <!--
                    <table cellpadding="0" cellspacing="15px" style="width: 630px; height: 550px">
                        <tr>
                            <td>
                            </td>
                        </tr>
                    </table>
                    <table border="0" cellpadding="10px" cellspacing="0" style="border: 1px solid #87adbf;vertical-align: top; text-align: center">
                        <tr>
                            <td>
                            $ ConnectionStrings:ITConnectionString
                            </td>
                        </tr>
                    </table>
                    内容页面
                    -->
                    <div id="rivcontent">
                        <div class="title">
                        Ping状态列表
                        </div>
                        <dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" 
                            DataSourceID="SqlDataSource1" KeyFieldName="id" Font-Size="12px" Width="800px">
                            <Columns>
                                <dx:GridViewDataTextColumn FieldName="id" ReadOnly="True" VisibleIndex="0" 
                                    Visible="False">
                                    <EditFormSettings Visible="False" />
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="username" VisibleIndex="1" 
                                    Visible="False">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="description" VisibleIndex="2" 
                                    Caption="描述">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="ip" VisibleIndex="3">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataTextColumn FieldName="pingstatus" VisibleIndex="4" 
                                    Caption="ping状态">
                                </dx:GridViewDataTextColumn>
                                <dx:GridViewDataMemoColumn Caption="ping详细描述" FieldName="pingdescription" 
                                    VisibleIndex="5">
                                </dx:GridViewDataMemoColumn>
                            </Columns>
                            <SettingsPager PageSize="4">
                            </SettingsPager>
                            <Styles>
                                <Header HorizontalAlign="Center">
                                </Header>
                            </Styles>
                        </dx:ASPxGridView>
                        <table border="0" cellpadding="10px" cellspacing="0">
                            <tr>
                                <td>
                                    <dx:ASPxButton ID="ASPxButton1" runat="server" Text="导出数据" 
                                        onclick="ASPxButton1_Click">
                                    </dx:ASPxButton>
                                </td>
                            </tr>
                        </table>
                    </div>
                </td>
            </tr>
        </table>
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:ITConnectionString %>" 
                            DeleteCommand="DELETE FROM [tb_tmppingstatus] WHERE [id] = @id" 
                            InsertCommand="INSERT INTO [tb_tmppingstatus] ([username], [description], [ip], [pingstatus], [pingdescription]) VALUES (@username, @description, @ip, @pingstatus, @pingdescription)" 
                            ProviderName="System.Data.SqlClient" 
                            SelectCommand="SELECT * FROM [tb_tmppingstatus] WHERE ([username] = @username)" 
                            UpdateCommand="UPDATE [tb_tmppingstatus] SET [username] = @username, [description] = @description, [ip] = @ip, [pingstatus] = @pingstatus, [pingdescription] = @pingdescription WHERE [id] = @id">
                            <DeleteParameters>
                                <asp:Parameter Name="id" Type="Int32" />
                            </DeleteParameters>
                            <InsertParameters>
                                <asp:Parameter Name="username" Type="String" />
                                <asp:Parameter Name="description" Type="String" />
                                <asp:Parameter Name="ip" Type="String" />
                                <asp:Parameter Name="pingstatus" Type="Int32" />
                                <asp:Parameter Name="pingdescription" Type="String" />
                            </InsertParameters>
                            <SelectParameters>
                                <asp:SessionParameter Name="username" SessionField="username" Type="String" />
                            </SelectParameters>
                            <UpdateParameters>
                                <asp:Parameter Name="username" Type="String" />
                                <asp:Parameter Name="description" Type="String" />
                                <asp:Parameter Name="ip" Type="String" />
                                <asp:Parameter Name="pingstatus" Type="Int32" />
                                <asp:Parameter Name="pingdescription" Type="String" />
                                <asp:Parameter Name="id" Type="Int32" />
                            </UpdateParameters>
                        </asp:SqlDataSource>
    <dx:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="ASPxGridView1">
    </dx:ASPxGridViewExporter>
    </form>
</body>
</html>